﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace DAL
{
    using DAL.Framework;

    [Table("SysRole")]
    public partial class SysRole : IBaseEntity
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Column("Id")]
        [Key]
        [Display(Name = "主键", Order = 1)]
        public string Id { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [Column("Name")]
        [StringLength(200, ErrorMessage = "长度不可超过200")]
        [Display(Name = "名称", Order = 2)]
        [Required(ErrorMessage = "不能为空")]
        public string Name { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [Column("Description")]
        [StringLength(4000, ErrorMessage = "长度不可超过4000")]
        [Display(Name = "描述", Order = 3)]
        public string Description { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column("Remark")]
        [StringLength(4000, ErrorMessage = "长度不可超过4000")]
        [Display(Name = "备注", Order = 4)]
        public string Remark { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("CreateTime")]
        [Display(Name = "创建时间", Order = 5)]
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [Column("CreatePerson")]
        [StringLength(200, ErrorMessage = "长度不可超过200")]
        [Display(Name = "创建人", Order = 6)]
        public string CreatePerson { get; set; }

        /// <summary>
        /// 编辑时间
        /// </summary>
        [Column("UpdateTime")]
        [Display(Name = "编辑时间", Order = 7)]
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 编辑人
        /// </summary>
        [Column("UpdatePerson")]
        [StringLength(200, ErrorMessage = "长度不可超过200")]
        [Display(Name = "编辑人", Order = 8)]
        public string UpdatePerson { get; set; }

        /// <summary>
        /// -
        /// </summary>
        [Timestamp]
        [Column("Version")]
        public Byte[] Version { get; set; }

        public virtual ICollection<SysPerson> SysPerson { get; set; }

        public virtual ICollection<SysMenu> SysMenu { get; set; }

        [NotMapped]
        [Display(Name = "人员")]
        public string SysPersonId { get; set; }

        [NotMapped]
        [Display(Name = "人员")]
        public string SysPersonIdOld { get; set; }

        [NotMapped]
        [Display(Name = "模块")]
        public string SysMenuId { get; set; }

        [NotMapped]
        [Display(Name = "模块")]
        public string SysMenuIdOld { get; set; }


    }
 
}

